package com.team.communication;

import java.net.Socket;

import com.team.client_server.ConnectClient;



public class CallClientMethods {

	static ConnectClient client;
	public CallClientMethods(Socket socket){
		client = new ConnectClient(socket);
	}
	
	public static void createGame(String name, int playersNumber){
		String[] tab = new String[2];
		tab[0] = "" + name;
		tab[1] = "" + playersNumber;
		client.sendMessage(ClientRequest.ASK_CREATE_GAME, tab);
	}
	
	public static void joinGame(String name){
		client.sendMessage(ClientRequest.ASK_JOIN_GAME, new String[]{name});
	}
	
	public static void choosePawn(String name) {
		client.sendMessage(ClientRequest.ASK_CHOOSE_PAWN, new String []{name});
	}
	
	public static void sendScoreDices(int score1, int score2) {
		client.sendMessage(ClientRequest.SEND_SCORE_DICES, new String [] {"" + score1, "" + score2});
	}
	
	public static void sendAccusation(String character, String room, String weapon) {
		client.sendMessage(ClientRequest.SEND_ACCUSATION, new String [] {character, weapon, room});
	}
	
	public static void sendSecretPassage() {
		client.sendMessage(ClientRequest.SEND_SECRET_PASSAGE, new String[0]);
	}

	public static void sendSuggestion(String character, String room, String weapon) {
		client.sendMessage(ClientRequest.SEND_SUGGESTION, new String [] {character, weapon, room});
	}

	public static void sendAskedCard(String card) {
		client.sendMessage(ClientRequest.SEND_ASKED_CARD, new String [] {card});
	}
	
	public static void returnAskedCard(String element) {
		client.sendMessage(ClientRequest.RETURN_ASKED_CARD, new String []{element});
	}
	
	public static void returnAskedCard() {
		client.sendMessage(ClientRequest.RETURN_ASKED_CARD, new String [0]);
	}
	
	
	public void sendCard(int card){
		//envoi de carte
	}
	public static void askExistGames() {
		client.sendMessage(ClientRequest.ASK_EXIST_GAMES, new String[0]);
	}

	public static void sendDeplacement(String string) {
		client.sendMessage(ClientRequest.SEND_DEPLACEMENT, new String[]{string});
		
	}

	public static void valideMove() {
		client.sendMessage(ClientRequest.SEND_VALIDE_DEPLACEMENT, new String[0]);
		
	}

	public static void sendReturnCard() {
		client.sendMessage(ClientRequest.RETURN_CARD, new String[0]);
	}

	
	
	

	
	
	
}
